package Singleton.demo6;

import java.io.Serializable;

public class Singleton implements Serializable {


    private Singleton()
    {

    }
    private static  class SingletonHandler
    {
        private static  final Singleton  INSTANCE = new Singleton();
    }

    private Object readResolve()
    {
        return SingletonHandler.INSTANCE;
    }
    public static Singleton getInstance()
    {
         return SingletonHandler.INSTANCE;
    }


}
